package com.guigu.guliproduct.feign;

import com.guigu.gulicommon.entity.pojo.res.Res;
import com.guigu.gulicommon.entity.vo.es.SkuEsModel;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 检索服务
 *
 * @author 陈俊杰
 * @version 1.0
 * @since 2024/8/25 23:26
 */
@FeignClient(name = "gateway-server", path = "/api/search", contextId = "SearchServer")
public interface SearchServer {
    /**
     * 商品上架到ES
     *
     * @param skuEsModels 商品
     * @return 商品添加结果
     */
    @PostMapping("/es/save/product")
    Res<SkuEsModel> productStatusUp(@RequestBody List<SkuEsModel> skuEsModels);
}
